package com.woniu.controller.homepage;

import com.woniu.entity.GoodsLog;
import com.woniu.service.homePage.IGoodsLogService;
import com.woniu.util.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商品浏览历史
 * @author 李松桦
 * @data 2023/3/14 12:04
 */
@RestController
@RequestMapping("/app/GoodsLog")
public class GoodsLogController {
    @Autowired
    IGoodsLogService goodsLogService;

    /*根据手机号查询商品浏览历史*/
    @RequestMapping("/queryGoodsLog")
    public ResData<?> queryGoodsLog(String phone){
        return goodsLogService.queryGoodsLog(phone);
    }

    /*根据手机号,商品编号删除商品浏览历史*/
    @RequestMapping("/deleteGoodsLog")
    public ResData<?> deleteGoodsLog(@RequestBody GoodsLog goodsLog){
        return goodsLogService.deleteGoodsLog(goodsLog);
    }
}
